list widgets: Document css structure
authorMatthias Clasen <mclasen@redhat.com>
Thu, 4 Jun 2020 14:05:17 +0000 (10:05 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 4 Jun 2020 14:05:17 +0000 (10:05 -0400)
We didn't fill in this expected part of the widget
documentation yet.

gtk/gtkcolumnview.c
gtk/gtkgridview.c
gtk/gtklistview.c

index 950f467f5b0491fb0354a06223371773d06e1749..707336c262f3eabe1d69293df69073c9ae1f79a7 100644 (file)
  * must be attached to a sort model for the data that the view is showing, and the
  * columns must have sorters attached to them by calling gtk_column_view_column_set_sorter().
  * The initial sort order can be set with gtk_column_view_sort_by_column().
+ *
+ * # CSS nodes
+ *
+ * |[<!-- language="plain" -->
+ * columnview[.column-separators]
+ * ├── header
+ * │   ├── <column header>
+ * ┊   ┊
+ * │   ╰── <column header>
+ * │
+ * ├── listview
+ * │
+ * ┊
+ * ╰── [rubberband]
+
+ * ]|
+ *
+ * GtkColumnView uses a single CSS node named columnview. It may carry the
+ * .column-separators style class, when #GtkColumnView:show-column-separators
+ * property is set. Header widets appear below a node with name header.
+ * The rows are contained in a GtkListView widget, so there is a listview
+ * node with the same structure as for a standalone GtkListView widget. If
+ * #GtkColumnView:show-row-separators is set, it will be passed on to the
+ * list view, causing its CSS node to carry the .separators style class.
+ * For rubberband selection, a node with name rubberband is used.
  */
 
 struct _GtkColumnView
index d16357a17b937352d7f555874338742e937fb073..855ee7a0faead79d6afbebb791b39670fc8ca948 100644 (file)
  * @see_also: #GListModel
  *
  * GtkGridView is a widget to present a view into a large dynamic grid of items.
+ *
+ * # CSS nodes
+ *
+ * |[<!-- language="plain" -->
+ * gridview
+ * ├── child
+ * │
+ * ├── child
+ * │
+ * ┊
+ * ╰── [rubberband]
+ * ]|
+ *
+ * GtkGridView uses a single CSS node with name gridview. Each child
+ * uses a single CSS node with name child. For rubberband selection,
+ * a subnode with name rubberband is used.
  */
 
 typedef struct _Cell Cell;
index 8688472e0a42f0f24c216c8c1266ffcea680c6df..5f043e591a0956ec5167c3f1b0b98dd42fe0981d 100644 (file)
  * @see_also: #GListModel
  *
  * GtkListView is a widget to present a view into a large dynamic list of items.
+ *
+ * # CSS nodes
+ *
+ * |[<!-- language="plain" -->
+ * listview[.separators]
+ * ├── row
+ * │
+ * ├── row
+ * │
+ * ┊
+ * ╰── [rubberband]
+
+ * ]|
+ *
+ * GtkListView uses a single CSS node named listview. It may carry the
+ * .separators style class, when #GtkListView:show-separators property
+ * is set. Each child widget uses a single CSS node named row. For
+ * rubberband selection, a node with name rubberband is used.
  */
 
 typedef struct _ListRow ListRow;